package com.article.service;

import com.article.common.PageParam;
import com.article.model.User;

import java.util.List;


public interface IUserService {

    /**
     * 列表查询
     * @param pageParam
     * @author lx
     * @return
     */
    PageParam queryAll (PageParam pageParam);


    /**
     * 根据id获取单条
     * @param id
     * @author lx
     * @return
     */
    User getOne (Integer id);

    /**
     * 根据account获取单条
     * @param account
     * @author lx
     * @return
     */
    User getOneByAccount (String account);

    /**
     * 新增
     * @param user
     * @author lx
     * @return
     */
    boolean add (User user);

    /**
     * 修改
     * @param user
     * @author lx
     * @return
     */
    boolean update (User user);

    /**
     * 删除
     * @param id
     * @author lx
     * @return
     */
    boolean delete(Integer id);

    /**
     * 批量删除
     * @param ids
     * @author lx
     * @return
     */
    boolean deleteByIds(Integer[] ids);

    /**
     * 批量密码重置
     * @param ids
     * @author lx
     * @return
     */
    boolean restPassword(Integer[] ids);
}
